﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CreditList.ascx.cs" Inherits="CreditList" %>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
    DataKeyNames="CreditID" DataSourceID="SqlDataSource1" 
    onselectedindexchanged="GridView1_SelectedIndexChanged">
    <Columns>
        <asp:CommandField ShowSelectButton="True" />
        <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
        <asp:BoundField DataField="MaxValue" HeaderText="MaxValue" 
            SortExpression="MaxValue" />
        <asp:BoundField DataField="MinValue" HeaderText="MinValue" 
            SortExpression="MinValue" />
        <asp:BoundField DataField="Description" HeaderText="Description" 
            SortExpression="Description" />
        <asp:BoundField DataField="CommissionPercentage" 
            HeaderText="CommissionPercentage" SortExpression="CommissionPercentage" />
        <asp:BoundField HeaderText="Валюта" />
        <asp:CheckBoxField DataField="AdvancedRepayment" HeaderText="AdvancedRepayment" 
            SortExpression="AdvancedRepayment" />
        <asp:CheckBoxField DataField="Active" HeaderText="Active" 
            SortExpression="Active" />
        <asp:BoundField DataField="CreditID" ReadOnly="True" 
            SortExpression="CreditID" Visible="False" >
        <HeaderStyle Width="1px" />
        <ItemStyle Width="1px" />
        </asp:BoundField>
    </Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:DatabaseConnectionString %>" 
    onselecting="SqlDataSource1_Selecting" 
    
    SelectCommand="SELECT [Name], [MaxValue], [MinValue], [Description], [CommissionPercentage], [AdvancedRepayment], [CreditID], [Active] FROM [Credit]">
</asp:SqlDataSource>

